package com.my.mybasefragment.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.my.mybasefragment.R;

public class SimpleActivity extends AppCompatActivity implements View.OnClickListener {
    private TextView tvIsWho;
    private String strWho;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_simple);
        findViewById(R.id.btn_back_simple).setOnClickListener(this);
        tvIsWho = findViewById(R.id.tv_is_who);

        Intent dataIntent = getIntent();
        strWho = dataIntent.getStringExtra("isWho");
        if (strWho != null) {
            tvIsWho.setText(strWho + "跳转而来");
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_back_simple: // 返回
                finish();
                break;
        }
    }
}
